/*
 * Loader.h
 *
 *  Created on: 18/05/2011
 *      Author: Rafael
 */

#ifndef LOADER_H_
#define LOADER_H_

#include "xmlParser.h"
#include "entity/GameObject.h"
#include <string>
#include "core/ContinuosMap.h"
#include <tilemap.hpp>
#include "core/SingleMap.h"
#include <sprite.hpp>
using namespace e2d::graphics;

using namespace std;

const string objectPath = "objects\\";
const string spritePath = "sprite\\";
const string mapPath = "map\\";
const string tilemapPath = "map\\tilemap\\";
const string itemPath = "item\\";

class Loader {
private:

public:
	Loader();
	virtual ~Loader();

	static Shoot *loadShoot(XMLNode xShoot, int id);
	static Attack *loadAttack(XMLNode xAttack, int id);
	static GameObject* loadGameObject(string objName);
	static GameObject* loadGameObject(string objName, string spriteName);
	static Body *loadBody(XMLNode xBody, int id);
	static Map* loadMap(string mapName, int *j=NULL);
	static SingleMap* loadSingleMap(XMLNode xMap);
	static ContinuosMap* loadContinousMap(XMLNode xMap, int *j=NULL);
	static SingleMap* loadSingleMap(string mapName);
	static ContinuosMap* loadContinousMap(string mapName, int *j=NULL);
	static TileMap* loadTileMap(string tileMapName);
	static void loadTileMapObjects(string tileMpaName, map<int, GameObject*>* objList);
	static Sprite* loadSprite(string spriteName);
	static GameObject* loadModel(string objName);
	static View* loadView(string spriteName, string *spriteAttack = NULL);
	static void loadMapObjects(string mapName, string tileMapName, map<int, GameObject*>* objList);
	static Ammo* loadAmmo(XMLNode xAmmo);
	static Weapon* loadWeapon(string itemName);
};

#endif /* LOADER_H_ */
